﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP_SaaS_WinForm.登录.Common
{
    public class APIResult<T>
    {
        [JsonProperty("code")]
        public int Code { get; set; }

        [JsonProperty("msg")]
        public string Message { get; set; } = string.Empty;

        [JsonProperty("data")]
        public T Data { get; set; }
    }
    
    public enum ResultCode
    {
        Success = 200,
        Failed = 400,
        Unauthorized = 401,
        NotFound = 404,
        ServerError = 500
    }
}
